\psset{unit=0.8,algebraic}
\begin{pspicture*}(-3,-3)(3,3)
\psaxes[labelFontSize=\scriptstyle,ticksize=-3pt 0,labelsep=2pt]{<->}(0,0)(-3,-3)(3,3)
\psplot[linecolor=blue]{-2}{2}{x}
\rput[l](1,2.5){$f(x)=x$}
\end{pspicture*}